<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script setup lang="ts">
import { onMounted } from 'vue'
import { useUserStore } from '@/stores/user'

const userStore = useUserStore()

// 应用初始化
onMounted(async () => {
  // 如果用户已登录但用户信息为空，则重新获取用户信息
  await userStore.initializeUser()
})
</script>

<style lang="scss">
#app {
  height: 100vh;
  width: 100vw;
}
</style>

